package com.zhentao.controller;

import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.model.es.dto.UserSearchDto;
import com.zhentao.service.ApArticleSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Date 2024/6/6 15:27
 * @Author xdm
 **/
@RestController
@RequestMapping("/api/v1/article/search")
public class ApArticleSearchController {

    @Autowired
    private ApArticleSearchService apArticleSearchService;

    @PostMapping("/search")
    public ResponseResult search(@RequestBody UserSearchDto dto){
        return apArticleSearchService.search(dto);
    }
}
